package com.sip.stream.utils.zfy;

import com.sip.stream.media.ZFYMediaManager;
import com.sip.stream.utils.zfy.encoder.IGSNV12Consumer;
import com.sip.stream.utils.zfy.osd.AbstractYUVOSDTool;
import com.sip.stream.utils.zfy.osd.OSDToolFactory;

public class GSNV12OSDDataSource extends GSNV12DataSource {
    private AbstractYUVOSDTool yuvosdTool;

    public GSNV12OSDDataSource(int width, int height, int fps) {
        super(width, height, fps);
        this.yuvosdTool = OSDToolFactory.createOSDTool(width, height, ZFYMediaManager.getInstance().getOSDConfig());
    }

    @Override
    public void addNV12Data(byte[] bArr, long j) {
        this.yuvosdTool.addOSDCache(bArr);
        super.addNV12Data(bArr, j);
    }

    @Override
    public void onStop(IGSNV12Consumer iGSNV12Consumer) {
        super.onStop(iGSNV12Consumer);
    }
}
